<!DOCTYPE html>
<html lang="en">
    <head>
        <meta charset="UTF-8">
        <title>Title</title>
    </head>
    <body>

        <script type="text/javascript">

            //声明一个用户对象
            var user1 = {
                "userName": "老唐",
                "userAge": 22,
                "userAddress":"上海"
            };
            //使用json
            console.log(user1)
            console.log(user1.userName)



            //声明多个用户对象
            var userList =[
                {"userName":"熊大","userAge":20,"userAddress":"东北"},
                {"userName":"熊二","userAge":19,"userAddress":"东北"},
                {"userName":"光头强","userAge":20,"userAddress":"东北"}
            ]
            //使用json
            console.log(userList)
            //获取第二个用户对象
            console.log(userList[1]);
            //打印：第二个用户对象的地址
            console.log(userList[1].userAddress)





        </script>


    </body>
</html>